package com.data.deal;

import com.data.deal.service.DataDealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ServiceJob {

    @Autowired
    private DataDealService dataDealService;


    // 每晚凌晨1点执行
    @Scheduled(cron = "0 0 1 * * ?")
    public void execute() {
        dataDealService.moveGhostSaProData();
    }

    @Scheduled(cron = "0/30 * * * * ?")
    public void executeCleanData() {
        dataDealService.cleanData();
    }

}
